Welcome to Planet OSGeo

October 06, 2024

After the initial ChatGPT hype in 2023 (when we saw the first LLM-backed QGIS plugins, e.g. QChatGPT and QGPT Agent), there has been a notable slump in new development. As far as I can tell, none of the early plugins are actively maintained anymore. They were nice tech demos but with limited utility.

However, in the last month, I saw two new approaches for combining LLMs with QGIS that I want to share in this post:

IntelliGeo plugin: generating PyQGIS scripts or graphical models

At the QGIS User Conference in Bratislava, I had the pleasure to attend the “Large Language Models and GIS” workshop presented by Gustavo Garcia and Zehao Lu from the the University of Twente. There, they presented the IntelliGeo Plugin which enables the automatic generation of PyQGIS scripts and graphical models.

The workshop was packed. After we installed all dependencies and the plugin, it was exciting to test the graphical model generation capabilities. During the workshop, we used OpenAI’s API but the readme also mentions support for Cohere.

I was surprised to learn that even simple graphical models are actually pretty large files. This makes it very challenging to generate and/or modify models because they take up a big part of the LLM’s context window. Therefore, I expect that the PyQGIS script generation will be easier to achieve. But, of course, model generation would be even more impressive and useful since models are easier to edit for most users than code.

Image source: https://github.com/MahdiFarnaghi/intelli_geo

ChatGeoAI: chat with PyQGIS

ChatGeoAI is an approach presented in Mansourian, A.; Oucheikh, R. (2024). ChatGeoAI: Enabling Geospatial Analysis for Public through Natural Language, with Large Language Models. ISPRS Int. J. Geo-Inf.13, 348.

It uses a fine-tuned Llama 2 model in combination with spaCy for entity recognition and WorldKG ontology to write PyQGIS code that can perform a variety of different geospatial analysis tasks on OpenStreetMap data.

The paper is very interesting, describing the LLM fine-tuning, integration with QGIS, and evaluation of the generated code using different metrics. However, as far as I can tell, the tool is not publicly available and, therefore, cannot be tested.

Image source: https://www.mdpi.com/2220-9964/13/10/348

Are you aware of more examples that integrate QGIS with LLMs? Please share them in the comments below. I’d love to hear about them.

by underdark at October 06, 2024 07:25 PM

October 05, 2024

Have you heard of an alidade? I hadn’t until Walter Schwartz sent me these pics.

He said “Behold the ingenious alidade, a surveying instrument here used as a fire finder. This one is displayed at the Cole Land Transportation Museum in Bangor, Maine. Forest rangers used these atop fire towers to report the distance and, in conjunction with another tower, the coordinates of fires. The map on this table covers an approximately 25 mile diameter (40 KM) inclusive of Augusta to Rockport Maine. The user viewed through a rectangular slot on one upright and rotated the metal structure to view the fire. Some tables were on slides so that the view would not be obstructed by parts of the tower structure. GPS and cameras solve the same problem today. “

Well who knew that? I found this great explanation of the alidade.

by Steven at October 05, 2024 09:00 AM

October 04, 2024

October 03, 2024

October 02, 2024

October 01, 2024

Rollo spotted this Mapsinthewild in a late 1940’s nuclear bunker operations room in York with the ‘most advanced map of the time’ laid out. This facility was designed to monitor impact and fall out. It would support a team of 60 for 30 days underground…. apparently design was out dated almost immediately (1950) but was still manned for 30 years!!!!

And here is the 1980’s tech update …

by Steven at October 01, 2024 09:00 AM

September 30, 2024

Back to entry 1

I was glancing at the New York Times and saw that Catherine, the Princess of Wales, had released an update on her treatment. And I thought, “wow, I hope she’s doing well”. And then I thought, “wow, I bet she gets a lot of positive affirmation and support from all kinds of people”.

I mean, she’s a princess.

Priness Katherine

Even us non-princesses, we need support too, and I have to say that I have been blown away by how kind the people around me in my life have been. And also how kind the other folks who I have never really talked with before have been.

I try to thank my wife as often as I can. It is hard not to feel like a burden when I am, objectively, a burden, no matter how much she avers I am not. I am still not fully well (for reasons), and I really want to be the person she married, a helpful full partner. It is frustrating to still be taking more than I’m giving.

From writing about my experience here, I have heard from other cancer survivors, and other folks who have travelled the particular path of colorectal cancer treatment. Some of them I knew from meetings and events, some from their own footprint on the internet, some of them were new to me. But they were all kind and supportive and it really helped, in the dark and down times.

From my work on the University of Victoria Board of Governors, I have come to know a lot of people in the community there, and they were so kind to me when I shared my diagnosis. My fellow board members stepped in and took on the tasks I have not been able to do the past few months, and the members of the executive and their teams were so generous in sending their well-wishes.

And finally, my employers at Crunchy Data were the best. Like above and beyond. When I told them the news they just said “take as much time as you need and get better”. And they held to that. My family doctor asked “do you need me to write you a letter for your employer” and I said “no, they’re good”, and he said, “wow! don’t see that very often”. You don’t. I’m so glad Crunchy Data is still small enough that it can be run ethically by ethical people. Not having to worry about employment on top of all the other worries that a cancer diagnosis brings, that was a huge gift, and not one I will soon forget.

I think people (and Canadians to a fault, but probably people in general) worry about imposing, that communicating their good thoughts and prayers could be just another thing for the cancer patient to deal with, and my personal experience was: no, it wasn’t. Saying “thanks, I appreciate it” takes almost no energy, and the boost of hearing from someone is real. I think as long as the patient doesn’t sweat it, as long as they recognize that “ackknowledged! thanks!” is a sufficient response, it’s all great.

Fortunately, I am not a princess, so the volume was not insuperable. Anyways, thank you to everyone who reached out over the past 6 months, and also to all those who just read and nodded, and maybe shared with a friend, maybe got someone to take a trip to the gastroenterologist for a colonoscopy.

Talk to you all again soon, inshala.

Mountain

September 30, 2024 12:00 AM

September 29, 2024

September 28, 2024

This year’s user conference took place in Bratislava, organized by the Slovak QGIS User Group and hosted at the Slovak University of Technology Faculty of Civil Engineering. The event was sold out early and the venue was full of energy and excitement.

If you missed the conference or couldn’t make it to a talk due to too many great overlapping sessions, you now have the opportunity to catch up with everything on the UC 2024 playing list:

Thanks to the organizers, speakers, sponsors, and all participants for the wonderful event.

If you want to read some personal reports from community members, here’s Ujaval Gandhi’s report: https://spatialthoughts.com/2024/09/14/qgis-user-conference-2024; and here’s Hans van der Kwast’s: https://www.qwast-gis.com/l/qgis-user-conference-2024/

Last but not least, we want you to save the date for next year’s user conference:

The QGIS User Conference will be in Norrköping, Sweden from 2-3 June 2025, and contributor meeting there after 4-7.

by underdark at September 28, 2024 05:26 PM

September 27, 2024

Dear OTB community, We are happy to announce that OTB version 9.1.0 has been released! Ready to use binary packages are available on the package page of the website: The Docker image is available :docker pull orfeotoolbox/otb:9.1.0 For those who want to use docker with python 3.10 or 3.12, you can respectively pull images 9.1.0_ubuntu22 […]

by Tristan Laurent at September 27, 2024 06:52 PM

This is clever. Reinder shared this place mat from the restaurant ‘Oortjeshekken’, in the Ooijpolder, near Nijmegen. Yes it is a place mat for your plate and cutlery in the restaurant and it is also a place map for the surrounding area.

by Steven at September 27, 2024 09:00 AM

September 26, 2024

Every domain has its baggage of concepts, which at first sight don't appear to be that terrible, but which are in practice.

Let's start with a non-geospatial example. A lot of programming languages have the concept of a "null" pointer. It is available in the C and C++ programming languages in particular, but in Java as well, or Python, etc.. Tony Hoare, null's creator, regrets its invention: "I call it my billion-dollar mistake." While very useful in some contexts, that feature also happens to cause a lot of bugs, with severe criticity in some cases. The Rust language has for example (almost) removed the null pointer concept and replace it with optional references, where the compiler enforces that the code explictly checks for the validity of the reference before using it. At the minute, I'm writing this, I'm debating about that very issue with a colleague.

The geospatial field is not free of concepts that are a never-ending source of troubles, and I will come with my own list, with my perspective of software developer.

- Geometry model. Point, lines, polygons. What could be most simple than that? Well, the commonly-used OGC Simple Features model allows those objects to be empty. How is that useful in practice? Hard to tell: NULL geometries are (somewhat paradoxically given the above paragraphy) actually a better replacement. My own perception of that "feature" is that it is mostly a huge headache that goes into your way when trying to write robust code. One evidence of that is that the same standard that invented it neglected to specify how to export an empty point in the Well Known Binary representation. Over the years, the tradition has become to use the Not-A-Number value for the X and Y value of an empty point. Which by itself may cause interesting consequences for applications that would neglect to make a special case. A Not-A-Number is ... well ... not a number, and for example it is not equal to itself ... (and in the IEEE-754 representation, there are litteraly billions of different binary potential encodings of a NotANumber). Everything you learnt at school in your math courses will break with it (this is actually quite general when crunching numbers with computers. Finite precision break a lot of the expected properties of ideal numbers). An empty line has the undesirable property of not having a start or end point: any algorithm must be ready for that. Another annoyance is that there is not just one "geometry empty" object, but a "point empty", a "line empty", a "polygon empty", etc. What is the expected intersection of an empty line with an empty polygon ? An empty line, an empty polygon, an empty point, ... ? The developers of the GEOS library or the PostGIS spatial extension have unfortunately to regularly debate at length about those topics. One can but think there would be a better use of their expertise and time than having to deal with such esoteric subjects (I didn't ask them, so they may actually be thrilled by them. You never know...)

- Coordinate reference system (CRS) axis order.  CRS, such as WGS 84 geographic, or UTM 31N / ETRS89 have several axis. For geographic CRS, this will be the longitude, the latitude, and optionally the ellipsoidal height. When expressing coordinates in a CRS, one must decide in which order they are specified. They are lengthy debates whether this should be longitude first, latitude second, or the reverse. The ISO 19111 / OGC Abstract Topic 2 specification or geodetic registries have decided to not take a firm stance on that, and have allowed authorities responsible for CRS definition and maintenance, to submit CRS definitions with the axis order they wish. Excellent! Well no. The issue is that while non-geomaticians user may chose to express a coordinate in prose like "50 degree of latitude north, 15 degree of longitude east", or "15 degree of longitude east, 50 degree of latitude north", that doesn't mean it is a good idea that the software systems reflect that liberty of speech. Some GIS formats have no way of clearly expressing the CRS, or if they have, they might use an incomplete way of specifying it, in particular lacking the way to express the axis order. The usual practice is to generally specify the longitude as the first value (as corresponding to the X/horizontal axis of a Cartesian plan) and latitude next (Y/vertical axis), refleting the natural mapping to make a graphical representation. Other formats (GML in particular) require that the coordinates are expressed in the order of the CRS definition, which require access to a database to get the axis order, given that in GML vector files, the CRS is only referenced through a code, and not defined inline. Depending on whether the persons responsible to design the protocol/file format, the order may be the "GIS friendly one" (longitude-latitude), or the "CRS pedantic one" (latitude-longitude for example for geographic CRS defined by the EPSG geodetic registry). This is an eternal source of confusion. Sometimes with absurd situations. The OGC GeoPackage file format captures a full definition of the CRS used in the vector tables it contains, including in particular the official axis order, but to reflect the long-GIS tradition, as an amendment, specify that the encoding of coordinates in its (extension of) the WKB format mentionned in the previous paragraph should be longitude-latitude (for geographic CRS) or easting-northing (for projected CRS). I will not blame anyone particular for this. This is an "overall system error". In the ideal situation, a courageous geomatician in a standard organization or in a geodetic registry should have said "here, we are geomaticians: geographic CRS are always longitude-latitude, and projected CRS are always easting-northing.  It is your responsibility as users of our system to provide data always in that order".  Failing to have access to a time-travel machine to warn in advance my glorious predecessors about the incoming catastrophe, the only solution I see to solve the issue it is to ask all population to relocate on the line of longitude=latitude, and exclude any mapping outside of it.

- Raster cell registration issues, a.k.a pixel-centre versus pixel-corner, or pixel-is-point versus pixel-is-area, a.k.a the half-pixel shift error. A raster cell is both an entity you reference with a (column, line) integer pair, so perceived as a discrete point, but when displayed, it actually occupies a non-zero area on your display device. When that raster cell is registered against geospatial coordinates, one debate is: "what exact place in that cell does this (longitude, latitude) or (easting, northing) refer to? Is that the center of the pixel, or maybe its top-left corner?" . Obviously, whenever there is a choice, file format and service specifications never agree together. The GDAL software has courgeously decided to "standardize" its internal model to the convention where that the georeferenced coordinate associated to a pixel qualifies the location of the top-left corner. GDAL format drivers do the necessary dance of applying and de-applying a half-pixel shift to go into that convention ... when they have access to the convention of the underlying format.

A temptative conclusion could be that any proposed standard or specification should go to the step of having an actual real-world implementation of it, not just a "working prototype" ("toy implementation" more casually), to check whether some apparently minor details are not a major source of inconvenience.

by Even Rouault (noreply@blogger.com) at September 26, 2024 08:52 PM

De tempos em tempos as pessoas costumam me fazer essa pergunta. A resposta curta é que ser código aberto não significa que tudo é de graça – você geralmente precisa de especialistas na área para ajudá-lo.

Por exemplo, GeoServer, QGIS e PostGIS você pode baixá-los, instalá-los e usá-los de graça. Claro. Mas sua empresa provavelmente ainda precisará pagar por:

📍 Qualquer nova funcionalidade que você queira implementar no software principal, especialmente se for bem específica ou de nicho para apenas uma pequena parte da base de usuários
📍 Consertar um bug crítico no código que afeta seu fluxo de trabalho de forma rápida (especialmente se afetar apenas uma parte muito pequena da base de usuários)
📍 Criar uma extensão/módulo/plugin que simplificaria algumas das tarefas específicas para sua organização
📍 Obter SLA (Acordo de Nível de Serviço), para que suas dúvidas/problemas com o software possam ser discutidos/resolvidos com prioridade e não bloqueiem seu trabalho
📍 Treinar sua equipe com os principais especialistas da área
📍 Migrar de soluções proprietárias para o ecossistema de código aberto, já que é preciso muito conhecimento para unir todos os componentes de código aberto para que funcionem bem

O bom do código aberto é que se empresas ou usuários apoiam financeiramente o projeto, todas as novas funcionalidades, correções e melhorias (como documentação) chegam a todos.

Então, se sua empresa quer ajudar um projeto de código aberto a crescer, uma ótima ideia é patrociná-lo. E se você estiver procurando por um desenvolvimento personalizado de WebGIS, treinamento, migração ou suporte em torno disso, você pode entrar em contato com a Geocursos. É isso que fazemos desde 2012 🙂

by Fernando Quadro at September 26, 2024 12:00 PM

The PostGIS Team is pleased to release PostGIS 3.5.0! Best Served with PostgreSQL 17 RC1 and GEOS 3.13.0.

This version requires PostgreSQL 12 - 17, GEOS 3.8 or higher, and Proj 6.1+. To take advantage of all features, GEOS 3.12+ is needed. SFCGAL 1.4+ is needed to enable postgis_sfcgal support. To take advantage of all SFCGAL features, SFCGAL 1.5 is needed.

3.5.0

This release is a feature release that includes bug fixes since PostGIS 3.4.3, new features, and a few breaking changes.

by Regina Obe at September 26, 2024 12:00 AM

September 25, 2024

A demanda por soluções geoespaciais acessíveis e em movimento está maior do que nunca. Como uma empresa de desenvolvimento de software que atende ao setor de GIS, você precisa entender a importância de fornecer aplicativos amigáveis ​​para dispositivos móveis que atendam às necessidades de seus clientes.

Você precisa criar soluções inovadoras e amigáveis ​​que capacitem os profissionais a acessar e utilizar dados espaciais a qualquer hora, em qualquer lugar.

👉 Alguns recursos principais de seus aplicativos GIS móveis devem incluir:

📍Recursos offline: Projete seus aplicativos para funcionar perfeitamente, mesmo em áreas com conectividade limitada à Internet, garantindo acesso ininterrupto a dados geoespaciais críticos.

📍Coleta de dados em tempo real: Os usuários devem ser capazes de capturar e atualizar informações espaciais em movimento, agilizando as operações de campo e melhorando a precisão dos dados.

📍Interfaces intuitivas: Priorize interfaces de usuário intuitivas e responsivas, facilitando a navegação e a interação dos profissionais com dados geoespaciais em seus dispositivos móveis.

📍Integração perfeita: Você deve ser capaz de integrar aplicativos GIS móveis com plataformas GIS existentes de desktop e baseadas em nuvem, garantindo um fluxo de trabalho coeso e eficiente.

Ao aproveitar o poder da tecnologia móvel, seus clientes podem aumentar sua produtividade, tomar decisões mais bem informadas e fornecer serviços superiores aos seus usuários finais.

Fonte: webgis.tech
Instagram: https://instagram.com/webgis.tech
LinkedIn: https://www.linkedin.com/company/webgis-tech

by Fernando Quadro at September 25, 2024 12:00 PM

September 24, 2024

Se você já se perguntou como se tornar um especialista em desenvolvimento WebGIS, este roteiro o guiará passo a passo pelas ferramentas e habilidades essenciais:

📍 Fundamentos do WebGIS: Aprenda a arquitetura e os termos chave.

📍 Desenvolvimento do lado do cliente (front-end): domine JavaScript, HTML/CSS e estruturas de UI (User Interface) como Bootstrap, por exemplo.

📍 Bibliotecas WebGIS: use o poderoso OpenLayers, Leaflet, Turf.js e muito mais e crie seu projeto.

📍 Domínio do lado do servidor (back-end): Aprenda Python, PostGIS, Django, GeoServer e obtenha a experiência que faz com que as empresas de GIS precisem de você.

📍 Crescimento na carreira: procure oportunidades para desenvolvedor WebGIS no mercado, mas enquanto ela não aparece, você pode começar como freelancer ou criar seu próprio WebGIS para ir adquirindo experiência!

E ai, o que você está esperando?

Fonte: webgis.tech
Instagram: https://instagram.com/webgis.tech
LinkedIn: https://www.linkedin.com/company/webgis-tech

by Fernando Quadro at September 24, 2024 12:00 PM

In 2023, our team of researchers from four U.S. universities announced a two-year project with support from an NSF grant (award 2303651). This project aims to modernize and expand the GRASS GIS platform, strengthen its role as a key geospatial processing engine, and build a diverse, vibrant global community of users and developers. We are excited to share the progress we have made so far toward these goals in the first half of the project.

September 24, 2024 08:12 AM

This video tutorial illustrates how to perform Random Forest classification of a Copernicus Sentinel-2 image using Remotior Sensus, a Python package that allows for the processing of remote sensing images and GIS data.
The tutorial is available as Jupyter notebook in Google Colab, a free service by Google that allows for executing a Jupyter notebook in the cloud.
Following the video of this tutorial.

Read more »

by Luca Congedo (noreply@blogger.com) at September 24, 2024 06:00 AM

GeoSpatial Techno is a startup focused on geospatial information that is providing e-learning courses to enhance the knowledge of geospatial information users, students, and other startups. The main approach of this startup is providing quality, valid specialized training in the field of geospatial information.

( YouTube | LinkedIn | Facebook | X )


Spatial Operators in GeoServer Filters

In this session, we want to talk about the Spatial operators in GeoServer in detail. If you want to access the complete tutorial, click on the link.

Introduction

GeoServer supports various spatial operators that filter geospatial data based on their location or spatial relationships with other features. These operators are commonly used with other filter expressions to create complex queries. These queries are useful for extracting specific subsets of data from a larger dataset.

The spatial operators are Topological, Distance, and Bounding Box operators. We’ll explain them in more detail below.

Note. This video was recorded on GeoServer 2.22.4, which is not the most up-to-date version. Currently, versions 2.24.x and 2.25.x are supported. To ensure you have the latest release, please visit this link and avoid using older versions of GeoServer.

Topological operators

In GeoServer, topological operators are used for spatial analysis and processing of geographic data. These operators perform geometric operations that preserve the spatial relationship or topology between geometric features. Some common topological operators in GeoServer include: Intersects, Within, Contains, etc.

Intersects

The Intersects filter in GeoServer is used to query spatial data based on the intersection of two geometry objects. For example, you can use this operator to extract all features that intersect with a specified Point, Line, or Polygon.

Here are some examples of how you can use this filter in an XML request to filter the States layer by the State_Name attribute:

  • Navigate to the Demos page, then select Demo requests.
  • From the Request section, select the WFS_getFeatureIntersects1.0.xml request.
  • The address will be filled in automatically, in the URL section.
  • Now, we will explain some elements:
    • The first thirteen lines include explanations in the form of comments.
    • Line 14 describes the XML version and the getFeatureIntersects operation of the WFS service being used.
    • Line 15 specifies the default output format for the WFS service as GML2. Additionally, GeoServer supports several other commonly used formats such as “gml3, shapefile, geojson, and csv.”
    • Lines 16 to 22 define the start of the XML request and declare the namespaces used in the request.
    • Line 23 specifies the type name of the feature to be queried. In this case, it requests features of the topp:states.
    • Lines 25 to 30 define the filter criteria for the query. On these lines, we use the Intersects filter, to retrieve all states that intersects with a Point defined by latitude and longitude.
  • Press the Submit button.

Note. For GeoServer 2.25.2 the Demo Request page has been improved to show response Headers, and provide the option to pretty print XML output.

Within

This operator is used to retrieve features that are completely within the specified geometry. For example, you can use this operator to extract all features that are within a polygon.

Here’s an example of how you can define a Within filter in XML. As an example of using this filter in a WFS getFeature request, use the following block codes to replace lines 24 to 31:

<Filter>
  <Within>
    <PropertyName>the_geom</PropertyName>
    <gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
	  <gml:outerBoundaryIs>
	    <gml:LinearRing>
		  <gml:coordinates>-90.73,29.85 -90.73,35.92 -80.76,35.92 -80.76,29.85 -90.73,29.85</gml:coordinates>
		</gml:LinearRing>
	  </gml:outerBoundaryIs>
    </gml:Polygon>
  </Within>
</Filter>

Press the Submit button. As you can see, the result includes two states named Alabama and Georgia.

Contains

This operator is used to filter data that is completely contained within a given geometry. For example, you can use this operator to extract all features that are completely contained within a polygon that represents a state boundary.

Here’s an example of how you can define a Contains operator in XML:

<Filter>
  <Contains>
    <PropertyName>the_geom</PropertyName>
    <gml:LineString srsName="EPSG:4326">
       <gml:coordinates>-89.35,31.46 -89.35,32.11 -89.49,32.23 -90.21,32.23</gml:coordinates>
    </gml:LineString>
  </Contains>
</Filter>

Press the Submit button. As you can see, the state that contains the given geometry is Mississippi.

You will need to adjust the filter and shape to match your data and SRS. Assuming you have a data source with a geometry column named the_geom that uses the EPSG:4326 coordinate system.

Distance operators

In GeoServer, Distance operators like “DWithin” and “Beyond” filters, are used to filter and retrieve features based on their spatial relationship and proximity to a given geometry or location. These operators can be used in WFS requests and are useful for performing spatial analysis and finding nearby features.

DWithin

The ‘DWithin’ or ‘Distance Within’ filter, will return records that are located within a specific distance of a defined point, much like a buffer. As well as the point geometry, you must specify the value of the distance from this point and the unit of measure. The units for the DWithin are: Feet, meters, kilometers and miles.

Here’s an example of how to use the DWithin filter in a GeoServer XML configuration file. To find all the features that are within 10000 meters of a given point in a layer called “sf:archsites”, the following WFS request can be used.

<wfs:GetFeature service="WFS" version="1.0.0"
            outputFormat="application/json" xmlns:wfs="http://www.opengis.net/wfs"
            xmlns:ogc="http://www.opengis.net/ogc"
            xmlns:gml="http://www.opengis.net/gml"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
  <wfs:Query typeName="sf:archsites">
    <ogc:Filter>
	  <ogc:DWithin>
		<ogc:PropertyName>the_geom</ogc:PropertyName>
		  <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#26713">
			<gml:coordinates>593250,4923867</gml:coordinates>
		  </gml:Point>
		<ogc:Distance units="meter">10000</ogc:Distance>
	  </ogc:DWithin>
	</ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

This will return all the features in “sf:archsites” layer, that are within 10000 meters of the given point. Remember that, the EPSG code mentioned in line 11 is very important because it serves as a reference point for importing coordinates and distance values.

Press the Submit button.

Bounding Box operators

The Bounding Box operator is used to filter data based on a specified bounding box. A bounding box is a rectangular region defined by its lower left and upper right coordinates: minx, miny, maxx, and maxy. For example, you can use this operator to extract all features that are located or partially located inside a box of coordinates.

As an example of using this operator, select the WFS_getFeatureBBOX1.0.xml from the Request section. Now the filters block code is as follows:

<Filter>
  <BBOX>
    <PropertyName>the_geom</PropertyName>
    <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
       <gml:coordinates>-75.102613,40.212597 -72.361859,41.512517</gml:coordinates>
    </gml:Box>
  </BBOX>
</Filter>

In this case, we just get the STATE_NAME and PERSONS attribute. Using the range specified in the code specifies the features that are completely or partially located in this area. The result includes four states named New York, Pennsylvania, Connecticut, and New Jersey as you see on the screen.


In this session, we took a brief journey through the “Spatial operators in GeoServer”. If you want to access the complete tutorial, click on the link.

by Milad Rafiei at September 24, 2024 12:00 AM

Back to entry 1

What happened there, I didn’t write for three months! Two words: “complications”, and “recovery”.

In a terrifying medical specialty like cancer treatment, one of the painful ironies is that patients spend a lot of time suffering from complications and side effects of the treatments, rather than the cancer. In my case and many others, the existence of the cancer isn’t even noticable without fancy diagnostic machines. The treatments on the other hand… those are very noticable!

cdiff

A lot of this comes with the territory of major surgery and dangerous chemicals. My surgery included specific possible complications including, but not limited to: incontinence, sexual disfunction, urinary disfunction, and sepsis.

Fortunately, I avoided all the complications specific to my surgery.

What I did not avoid was a surprisingly common complication of spending some time in a hospital while taking broad spectrum antibiotics–I contracted the “superbug” clostridioides difficile, aka c.diff.

Let me tell you, finding you have a “superbug” is a real bummer, and c.diff lives up to its reputation. Like cancer, it is hard to kill, it does quite a bit of damage while it’s in you, and the things that kill it also do a lot of damage to your body.

cdiff

Killing my c.diff required a couple of courses of specialized antibiotics (vancomycin), that in addition to killing the c.diff also killed all the other beneficial bacteria in my lower intestine.

So, two months after surgery, I was recovering from:

  • having my lower intestine handled and sliced in a major surgery
  • having that same intestine populated with c.diff and covered in c.diff toxins
  • having the microbiotic population living in my intestine nuked with a modern antibiotic developed to kill resistant superbugs

Not surprisingly, having all those things at once makes for a much longer recovery, and a pretty up-and-down one. My slowly recovering microbiota is in constant flux, which results in some really surprising symptoms.

  • highly variable stomach discomfort (ok)
  • highly variable appetite (makes sense)
  • random days of fatigue (really?)
  • random days of anxiety (what?!?)

I had not really understood the implications of gut/brain connection, until this journey showed me just how tightly bound my mental state was to the current condition of my guts. The anxiety I have experienced as a result of my c.diff exposure has been worse, amazingly, than what I felt after my initial cancer diagnosis. One was in my head, but the other was in my gut.

cdiff

I have also developed a much more acute sympathy for people suffering from long Covid and other chronic diseases. The actual symptoms are bad enough, but the psychological effect of the symptom variability is really hard to deal with. Bad days follow good days, with no warning. I have mostly stopped voicing any optimism about my condition, because who knows what tomorrow will bring.

When people ask me how I’m doing, I shrug.

One thing I have got going for me, that chronic disease sufferers do not, is a sense that I am in fact improving. I started journaling my symptoms early in the recovery process, and I can look back and see definitively that while things are unpredictable day to day, or even week to week, the long term trajectory is one of improvement.

Without that, I think I’d go loopy.

Anyways, I am now rougly three months out from my last course of antibiotics, and I expect it will be at least another three months before I’m firing on all cylinders again, thanks mostly to the surgical complication of acquiring c.diff. If I was just recovering from the surgery, I imagine I would be much closer to full recovery.

Harvesting apples

September 24, 2024 12:00 AM

September 23, 2024

September 22, 2024

Exploring the heart of Toulouse, France, a city steeped in history and culture. This tiny map highlights some of the must-see spots in the city center:

  • Capitole: The grand city hall and opera house.
  • Place du Capitole: A bustling square with cafes, shops, and street performers.
  • Saint-Sernin Basilica: A UNESCO World Heritage Site known for its Romanesque architecture and impressive cloister.

by Arnaud at September 22, 2024 09:00 AM

September 21, 2024

Today marks the release of Trajectools 2.3 which brings a new set of algorithms, including trajectory generalizing, cleaning, and smoothing.

To give you a quick impression of what some of these algorithms would be useful for, this post introduces a trajectory preprocessing workflow that is quite general-purpose and can be adapted to many different datasets.

We start out with the Geolife sample dataset which you can find in the Trajectools plugin directory’s sample_data subdirectory. This small dataset includes 5908 points forming 5 trajectories, based on the trajectory_id field:

We first split our trajectories by observation gaps to ensure that there are no large gaps in our trajectories. Let’s make at cut at 15 minutes:

This splits the original 5 trajectories into 11 trajectories:

When we zoom, for example, to the two trajectories in the north western corner, we can see that the trajectories are pretty noisy and there’s even a spike / outlier at the western end:

If we label the points with the corresponding speeds, we can see how unrealistic they are: over 300 km/h!

Let’s remove outliers over 50 km/h:

Better but not perfect:

Let’s smooth the trajectories to get rid of more of the jittering.

(You’ll need to pip/mamba install the optional stonesoup library to get access to this algorithm.)

Depending on the noise values we chose, we get more or less smoothing:

Let’s zoom out to see the whole trajectory again:

Feel free to pan around and check how our preprocessing affected the other trajectories, for example:

by underdark at September 21, 2024 02:34 PM

This came from Reinder

Portrait of Eugeniusz Romer
It hangs above the desk of the director of the Institute of Geography and Regional Development at the University of Wroclaw. It shows the eminent geographer and cartographer depicted against the background of a planiglobium map.

Romer, (1871-1954) was the founder of modern Polish cartography and co-founder of the Ksiaznica-Atlas publishing house in Lwow, one of the most important Polish publishing houses in the interwar period. It was a house publishing textbooks and teaching aids for teachers and students, cartographic publications, children’s and young adult literature, and encyclopaedias. After the Second World War, the publishing house resumed its activities in Wroctaw, where many atlases of Poland and the world were published under Romer’s editorship.

by Steven at September 21, 2024 09:00 AM

September 20, 2024

September 19, 2024

I’ve been thinking for a bit of time that I need to redo my website as some of the pages had evolved a bit, and were getting a bit too long. What you see now is what I have come up with:

I also took the opportunity to ‘rebrand’ myself. Previously I’d used the name Geospatial Training Solutions to market my freelance work. I was never completely happy with the name - it was a bit long and a bit generic - and after some thought I decided I would be better trading under my own name - Nick Bearman - as that is a name already known in the GIS community and it is me that I am selling. I am freelance and have no current plans to expand or to hire other people - I am just me!

Anyway, once I’d made that decision, the question was how to make my new website. I’ve been using WordPress which worked reasonably well, but it has a relatively complex infrastructure under the hood (database, etc.) which:

  1. opens it up to more vulnerabilities and

  2. upgrading WordPress was always something that needed to be done every so often, and then I had to make sure everything worked as I wanted.

I looked around and found various examples that were similar to what I wanted to achieve:

I mostly used these to think about content, but it was also helpful to consider the different technologies as well. More people were using WordPress that I thought, and often they were not ‘obviously’ WordPress sites. I wanted something simple, and certainly something I could update easily. Easy of updating was a common theme! To quote Pokateo / Kate:

At this point, Quarto had been released and they had some interesting possibilities for websites. I’d dabbled a bit with Quarto for PDF documents and websites (including A geographer’s introduction to QGIS & R) after using RMarkdown for several years. Quarto looked ideal, so I started experimenting with it. It is plain text, and can work with GitHub, which I am using fairly regularly.

Quarto also has a very good website, with lots of examples including creating a website https://quarto.org/docs/websites/ and you can also choose from a variety of different themes https://bootswatch.com/.

After various rounds of development, I came up with this site, https://nickbearman.github.io/. It is (I hope) a simple site which has what I need on it. It also supports blogs, which I do contribute to semi-regularly. It is also all static pages, so once it is updated it can just sit there and doesn’t need any database provision or anything else to run. The new site also incorporated a search, which is handy.

You can host it through GitHub Pages, and there are various options to automatically compile it using continuous integration, but I decided to keep things simple, to compile the site locally and the push to GitHub. Sometimes the potential to automate things isn’t worth the time to set it up!

from https://xkcd.com/1205 CC license

Transferring my blog posts from WordPress (geospatialtrainingsolutions.co.uk and nickbearman.me.uk) was a bit of a faff but it is getting there. It is a work in progress. I have found a semi-automated way of doing this, but it will still take some time. I’m also trying to extract a static copy of the WordPress sites for archiving, with the Simpy Static WordPress plugin looking useful.

I also used to have a contact form, which I received some useful contacts through so I wanted to include this. Quarto as such doesn’t include such a form, as there is no interaction, but I had a brainwave and decided to use a Google Forms instead. We’ve used these a lot at OSGeo:UK and they work really well.

I hope you found this useful - do let me know what you think!

And if you want to learn more about GIS, checkout my new Training Courses page and if you want a bespoke course, make use of my new Contact Form!

by Nick Bearman at September 19, 2024 11:00 PM

September 18, 2024

Using keywords from a thesaurus as queryables

A common convention in catalogues is the use of keywords from a dedicated thesaurus. The assignment of these keywords can then later be used to filter or query the catalogue by these terms. To achieve this use case in pycsw, some configuration needs to be tailored. This blog post indicates the changes needed for this scenario.

For this example we’ll use a keyword from the INSPIRE Themes thesaurus. We will define a new queryable inspiretheme, which will be populated with the relevant keyword (if present).

You can repeat these steps for any other thesaurus.

Extra database column

Extend the records table in the database with an extra field for the selected thesaurus. This is usually a manual operation on the database.

ALTER TABLE records
ADD inspiretheme VARCHAR(255);

Add parameter to pycsw

In pycsw/core/config.py the newly created database column can be registered to pycsw.

'pycsw:InspireTheme': 'inspiretheme',

Add column to mapping

etc/mappings.py links the pycsw parameter to the columnname in the table.

'pycsw:InspireTheme': 'inspiretheme',

Define parameter as queryable

Which of the parameters are queryable is defined in pycsw/core/repository.py.

'inspiretheme': self.dataset.inspiretheme,

Add parameter to record results?

Keywords are already published in records, so there is generally no need to extend the record with the new parameter. If needed you can do so in pycsw/ogc/api/records.py (Line 1150).

Populate the parameter from record imports

We have 2 options here, either manage the population of the column within the database as part of an insert trigger on the record.themes field. Alternatively update pycsw/core/metadata.py so the column is populated when records are imported.

For the second option consider the following code. For each of the keyword blocks, it tries to match the thesaurus title or uri and, if matched, adds the keywords to the new parameter.

_set(context, recobj, 'pycsw:InspireTheme', ", ".join(
    [", ".join(k.name for k in t.keywords if k.name not in [None,'']) for t in md_identification.keywords if ( hasattr(t,'thesaurus') and 
        t.thesaurus not in [None,''] and ((
            'title' in t.thesaurus and t.thesaurus['title'] not in [None,''] and
            t.thesaurus['title'] in ['GEMET - INSPIRE themes, version 1.0','GEMET Themes, version 2.3']
        ) or (
            'uri' in t.thesaurus and t.thesaurus['uri'] not in [None,''] and
            t.thesaurus['uri'] == 'http://inspire.ec.europa.eu/theme')))]))

Add parameter to OGC API - Records facets

Facets enable to further limit search results. Keywords from thesauri are very useful to add as facet. Add the paremeter to default.yml.

facets:
    - type
    - inspiretheme

September 18, 2024 06:59 PM

GeoTools 29.6 releasedGeoTools team is providing a release of GeoTools 29.6:geotools-29.6-bin.zipgeotools-29.6-doc.zipgeotools-29.6-userguide.zipgeotools-29.6-project.zipThis is an unscheduled release provided to help teams address&nbsp;CVE-2024-36404. Details of this issue will be made available at the end of the month. This is in keeping with our coordinated vulnerability disclosure policy&nbsp

by Jody Garnett (noreply@blogger.com) at September 18, 2024 05:13 PM